import request from '@/router/axios';
// 获取列表
export const getList = (current, size, params) => {
  return request({
    url: '/api/hg-equipment/repair/task/out/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 接单
export const receive = (id) => {
  return request({
    url: '/api/hg-equipment/repair/task/receive',
    method: 'get',
    params: {
      id
    }
  })
}

// 委外任务详情
export const detail = (id) => {
  return request({
    url: '/api/hg-equipment/repair/task/out/info',
    method: 'get',
    params: {
      id
    }
  })
}

// 保存维修计划
export const savePlan = (data) => {
  return request({
    url: '/api/hg-equipment/repair/plan/save',
    method: 'post',
    data
  })
}

// 保存维修结果
export const saveResult = (data) => {
  return request({
    url: '/api/hg-equipment/repair/result/save',
    method: 'post',
    data
  })
}

// 提交维修结果
export const resultsCommit = (id) => {
  return request({
    url: '/api/hg-equipment/repair/result/commit',
    method: 'get',
    params: {
      id
    }
  })
}